package com.wang.springbootinit.model.result;

import com.wang.springbootinit.constant.BISystemEnum;
import com.wang.springbootinit.model.vo.BIResponse;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 用作分析处理实现类返回类
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BIResponseResult {

    /**
     * 返回体code
     */
    private int code;

    /**
     * 返回具体信息
     */
    private BIResponse data;

    /**
     * 返回体成功失败消息描述
     */
    private String message;

    public BIResponseResult(BIResponse biResponse){
        this.data = biResponse;
        this.code = BISystemEnum.SUCCESS.getCode();
        this.message = BISystemEnum.SUCCESS.getMsg();
    }
}
